package ygg.encoding.swf.tag.codec
{
	import j.sus2maj7.encoding.*;
	import j.sus2maj7.context.*;
	import j.sus2maj7.util.*;
	
	import ygg.encoding.swf.tag.*;
	import ygg.encoding.swf.tag.object.*;
	import ygg.encoding.swf.abc.*;
	
	public class DoABC2Codec extends DoABCCodec //TagCodec
	{
		public function DoABC2Codec()
		{
			super();
		}
		//*
		override public function decode(binary:IBinary, context:IContext=null):*
		{
			var retVal:DoABC2 = new DoABC2();
			var b:TagBinary = binary as TagBinary;
			b.position = 0;
			b.syncBits();
			//trace( ByteUtil.print(b.ba) );
			
			b.readInt(); //1
			trace("\nabc name " + b.readString() + "\n");
			b.readBytes(b.ba);
			var doABC:DoABC = super.decode(b, context);
			
			var ctx:AbcContext = doABC.context;
			
			
			return doABC;
		}
		
		override public function encode(o:*, context:IContext=null):IBinary
		{
			var b:TagBinary = new TagBinary();
			var obj:DoABC2 = o as DoABC2;
			
			
			
			return b;
		}//*/
	}
}